{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "1、完成nan和inf的使用，掌握数组中nan值去除，替换为对应列的平均值",
   "id": "66dac5f9de3cebe4"
  },
  {
   "cell_type": "code",
   "id": "e80317b209b27288",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-01-07T11:40:51.109992Z",
     "start_time": "2025-01-07T11:40:51.090589Z"
    }
   },
   "source": [
    "import numpy as np\n",
    "a = np.nan\n",
    "b = np.inf\n",
    "print(a,type(a))\n",
    "print(b,type(b))\n",
    "# --判断数组中为 nan 的个数\n",
    "t = np.arange(24,dtype=float).reshape(4,6)\n",
    "# 将一些数改成 nan\n",
    "t[[1,2],2:] = np.nan\n",
    "print(t)"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "nan <class 'float'>\n",
      "inf <class 'float'>\n",
      "[[ 0.  1.  2.  3.  4.  5.]\n",
      " [ 6.  7. nan nan nan nan]\n",
      " [12. 13. nan nan nan nan]\n",
      " [18. 19. 20. 21. 22. 23.]]\n"
     ]
    }
   ],
   "execution_count": 5
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:41:25.602078Z",
     "start_time": "2025-01-07T11:41:25.595772Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 将 nan 替换成这一列的平均值\n",
    "for i in range(t.shape[1]):\n",
    "    #获取当前列数据\n",
    "    temp_col = t[:,i]\n",
    "    # 判断当前列的数据中是否含有 nan\n",
    "    nan_num = np.count_nonzero(temp_col != temp_col)\n",
    "    # 条件成立说明含有 nan\n",
    "    if nan_num != 0:\n",
    "        # 将这一列不为 nan 的数据拿出来\n",
    "        temp_col_not_nan = temp_col[temp_col == temp_col]\n",
    "        # 将 nan 替换成这一列的平均值\n",
    "        temp_col[np.isnan(temp_col)] = np.mean(temp_col_not_nan)\n",
    "print(t)"
   ],
   "id": "initial_id",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 0.  1.  2.  3.  4.  5.]\n",
      " [ 6.  7. 11. 12. 13. 14.]\n",
      " [12. 13. 11. 12. 13. 14.]\n",
      " [18. 19. 20. 21. 22. 23.]]\n"
     ]
    }
   ],
   "execution_count": 7
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "2、np二维数组转置练习，轴滚动练习",
   "id": "dab1eea84d7db11a"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:41:50.450247Z",
     "start_time": "2025-01-07T11:41:50.437585Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#对换数组的维度\n",
    "a = np.arange(12).reshape(3,4)\n",
    "print ('原数组： ')\n",
    "print (a )\n",
    "print ('\\n')\n",
    "print ('对换数组： ')\n",
    "print (np.transpose(a))"
   ],
   "id": "174ae2a2c04f7666",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "原数组： \n",
      "[[ 0  1  2  3]\n",
      " [ 4  5  6  7]\n",
      " [ 8  9 10 11]]\n",
      "\n",
      "\n",
      "对换数组： \n",
      "[[ 0  4  8]\n",
      " [ 1  5  9]\n",
      " [ 2  6 10]\n",
      " [ 3  7 11]]\n"
     ]
    }
   ],
   "execution_count": 8
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:41:59.861231Z",
     "start_time": "2025-01-07T11:41:59.841401Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 与 transpose 一致\n",
    "a = np.arange(12).reshape(3,4)\n",
    "print ('原数组： ')\n",
    "print (a)\n",
    "print ('\\n')\n",
    "print ('转置数组： ')\n",
    "print (a.T)"
   ],
   "id": "24d2aad205612d0c",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "原数组： \n",
      "[[ 0  1  2  3]\n",
      " [ 4  5  6  7]\n",
      " [ 8  9 10 11]]\n",
      "\n",
      "\n",
      "转置数组： \n",
      "[[ 0  4  8]\n",
      " [ 1  5  9]\n",
      " [ 2  6 10]\n",
      " [ 3  7 11]]\n"
     ]
    }
   ],
   "execution_count": 9
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:42:09.832934Z",
     "start_time": "2025-01-07T11:42:09.827165Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 函数用于交换数组的两个轴\n",
    "t1 = np.arange(24).reshape(4,6)\n",
    "re = t1.swapaxes(1,0)\n",
    "print (' 原 数 组 ： ')\n",
    "print (t1)\n",
    "print ('\\n')\n",
    "print ('调用 swapaxes 函数后的数组： ')\n",
    "print (re)"
   ],
   "id": "2fd26c42b6d88cf1",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " 原 数 组 ： \n",
      "[[ 0  1  2  3  4  5]\n",
      " [ 6  7  8  9 10 11]\n",
      " [12 13 14 15 16 17]\n",
      " [18 19 20 21 22 23]]\n",
      "\n",
      "\n",
      "调用 swapaxes 函数后的数组： \n",
      "[[ 0  6 12 18]\n",
      " [ 1  7 13 19]\n",
      " [ 2  8 14 20]\n",
      " [ 3  9 15 21]\n",
      " [ 4 10 16 22]\n",
      " [ 5 11 17 23]]\n"
     ]
    }
   ],
   "execution_count": 10
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:42:18.303554Z",
     "start_time": "2025-01-07T11:42:18.292019Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#轴滚动\n",
    "t=np.ones((3,4,5,6))\n",
    "t=np.rollaxis(t,3,2)\n",
    "print(t.shape)"
   ],
   "id": "f6569a8a09ca59af",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(3, 4, 6, 5)\n"
     ]
    }
   ],
   "execution_count": 11
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "3、练习series和df的索引操作,函数应用",
   "id": "a78227ce76d757b8"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:43:15.584083Z",
     "start_time": "2025-01-07T11:43:14.858203Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import pandas as pd\n",
    "# 通过 list 构建 Series\n",
    "ser_obj = pd.Series(range(10, 20))\n",
    "print(ser_obj.head(3))"
   ],
   "id": "9666130f5cc1ed20",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0    10\n",
      "1    11\n",
      "2    12\n",
      "dtype: int64\n"
     ]
    }
   ],
   "execution_count": 12
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:44:04.135783Z",
     "start_time": "2025-01-07T11:44:04.124140Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 获取数据\n",
    "print(ser_obj.values)\n",
    "# 获取索引\n",
    "print(ser_obj.index)\n",
    "#通过索引获取数据\n",
    "print(ser_obj[0])\n",
    "print(ser_obj[8])"
   ],
   "id": "deb59685b355d5b1",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[10 11 12 13 14 15 16 17 18 19]\n",
      "RangeIndex(start=0, stop=10, step=1)\n",
      "10\n",
      "18\n"
     ]
    }
   ],
   "execution_count": 15
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:44:57.593815Z",
     "start_time": "2025-01-07T11:44:57.586286Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 通过 ndarray 构建 DataFrame\n",
    "t = pd.DataFrame(np.arange(12).reshape((3,4)))\n",
    "print(t)\n",
    "array = np.random.randn(5,4)\n",
    "print(array)"
   ],
   "id": "49346499002cbb47",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   0  1   2   3\n",
      "0  0  1   2   3\n",
      "1  4  5   6   7\n",
      "2  8  9  10  11\n",
      "[[-0.64585652 -0.36381365 -0.25993381  0.08025492]\n",
      " [-0.95113575  0.40181645  0.26934093  3.20266401]\n",
      " [-0.69040705 -0.69962002  0.46974686  0.60100658]\n",
      " [-0.22784614 -0.66913887 -0.43121367  0.81803837]\n",
      " [-0.89916452 -1.34098801  0.50243906 -0.31616999]]\n"
     ]
    }
   ],
   "execution_count": 16
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:45:06.938639Z",
     "start_time": "2025-01-07T11:45:06.915902Z"
    }
   },
   "cell_type": "code",
   "source": [
    "df_obj = pd.DataFrame(array)\n",
    "print(df_obj.head())"
   ],
   "id": "acf5a1e1fff4d96f",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          0         1         2         3\n",
      "0 -0.645857 -0.363814 -0.259934  0.080255\n",
      "1 -0.951136  0.401816  0.269341  3.202664\n",
      "2 -0.690407 -0.699620  0.469747  0.601007\n",
      "3 -0.227846 -0.669139 -0.431214  0.818038\n",
      "4 -0.899165 -1.340988  0.502439 -0.316170\n"
     ]
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:45:36.068624Z",
     "start_time": "2025-01-07T11:45:36.055847Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 通过 dict 构建 DataFrame\n",
    "dict_data = {'A': 1,\n",
    "             'B': pd.Timestamp('20190926'),\n",
    "             'C': pd.Series(1,index=list(range(4)),dtype='float32'),\n",
    "             'D': np.array([3] * 4,dtype='int32'),\n",
    "             'E': [\"Python\",\"Java\",\"C++\",\"C\"],\n",
    "             'F': 'wangdao' }\n",
    "df_obj2 = pd.DataFrame(dict_data)\n",
    "print(df_obj2)"
   ],
   "id": "c1968a6d0cc47f5b",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   A          B    C  D       E        F\n",
      "0  1 2019-09-26  1.0  3  Python  wangdao\n",
      "1  1 2019-09-26  1.0  3    Java  wangdao\n",
      "2  1 2019-09-26  1.0  3     C++  wangdao\n",
      "3  1 2019-09-26  1.0  3       C  wangdao\n"
     ]
    }
   ],
   "execution_count": 18
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:46:20.779752Z",
     "start_time": "2025-01-07T11:46:20.768834Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#函数应用\n",
    "#可直接使用 NumPy 的函数\n",
    "# Numpy ufunc 函数\n",
    "df = pd.DataFrame(np.random.randn(5,4) - 1)\n",
    "print(df)\n",
    "print(np.abs(df))"
   ],
   "id": "e95ac24ded5e08a7",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          0         1         2         3\n",
      "0 -1.720962 -0.066426 -1.205000 -0.217044\n",
      "1 -1.392777 -0.683185 -1.155914 -0.653809\n",
      "2 -2.287295 -1.851884 -1.168895 -1.378028\n",
      "3 -1.150663 -0.427409  0.146323 -0.013135\n",
      "4 -1.722285 -0.713907 -0.738499 -1.139579\n",
      "          0         1         2         3\n",
      "0  1.720962  0.066426  1.205000  0.217044\n",
      "1  1.392777  0.683185  1.155914  0.653809\n",
      "2  2.287295  1.851884  1.168895  1.378028\n",
      "3  1.150663  0.427409  0.146323  0.013135\n",
      "4  1.722285  0.713907  0.738499  1.139579\n"
     ]
    }
   ],
   "execution_count": 19
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:46:30.720844Z",
     "start_time": "2025-01-07T11:46:30.704705Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#通过 apply 将函数应用到列或行上\n",
    "print(df.apply(lambda x : x.max()))"
   ],
   "id": "1f81a0d0d6fce88f",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0   -1.150663\n",
      "1   -0.066426\n",
      "2    0.146323\n",
      "3   -0.013135\n",
      "dtype: float64\n"
     ]
    }
   ],
   "execution_count": 20
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:46:38.154353Z",
     "start_time": "2025-01-07T11:46:38.138919Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 指定轴方向， axis=1， 方向是行\n",
    "print(df.apply(lambda x : x.max(), axis=1))"
   ],
   "id": "71d3587758d52c5f",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0   -0.066426\n",
      "1   -0.653809\n",
      "2   -1.168895\n",
      "3    0.146323\n",
      "4   -0.713907\n",
      "dtype: float64\n"
     ]
    }
   ],
   "execution_count": 21
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:46:49.786085Z",
     "start_time": "2025-01-07T11:46:49.773127Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#通过 map 将函数应用到每个数据上\n",
    "f2 = lambda x : '%.2f' % x\n",
    "print(df.map(f2))"
   ],
   "id": "4342368e65a22c7a",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "       0      1      2      3\n",
      "0  -1.72  -0.07  -1.20  -0.22\n",
      "1  -1.39  -0.68  -1.16  -0.65\n",
      "2  -2.29  -1.85  -1.17  -1.38\n",
      "3  -1.15  -0.43   0.15  -0.01\n",
      "4  -1.72  -0.71  -0.74  -1.14\n"
     ]
    }
   ],
   "execution_count": 22
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:46:57.402555Z",
     "start_time": "2025-01-07T11:46:57.384993Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#索引排序\n",
    "# Series\n",
    "s4 = pd.Series(range(10, 15), index = np.random.randint(5, size=5))\n",
    "print(s4)\n",
    "# 索引排序\n",
    "s4.sort_index()"
   ],
   "id": "9b6939e8d3cca805",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1    10\n",
      "1    11\n",
      "4    12\n",
      "2    13\n",
      "1    14\n",
      "dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1    10\n",
       "1    11\n",
       "1    14\n",
       "2    13\n",
       "4    12\n",
       "dtype: int64"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 23
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:47:10.707465Z",
     "start_time": "2025-01-07T11:47:10.697878Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# DataFrame\n",
    "df4 = pd.DataFrame(np.random.randn(3, 5),\n",
    "index=np.random.randint(3, size=3),\n",
    "columns=np.random.randint(5, size=5))\n",
    "print(df4)\n",
    "df4_isort = df4.sort_index(axis=1, ascending=False)\n",
    "print(df4_isort)"
   ],
   "id": "e5ce0fc9c5f8adb3",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          3         1         3         0         4\n",
      "0  0.270778 -0.521531 -0.924679 -1.102402  0.232356\n",
      "1 -0.414413 -0.515480  0.147597 -1.559525 -0.217399\n",
      "1  0.381645  0.677117 -0.177761  0.951410 -0.039082\n",
      "          4         3         3         1         0\n",
      "0  0.232356  0.270778 -0.924679 -0.521531 -1.102402\n",
      "1 -0.217399 -0.414413  0.147597 -0.515480 -1.559525\n",
      "1 -0.039082  0.381645 -0.177761  0.677117  0.951410\n"
     ]
    }
   ],
   "execution_count": 24
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:47:19.184608Z",
     "start_time": "2025-01-07T11:47:19.173784Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#按值排序\n",
    "df4_vsort = df4.sort_values(by=1, ascending=False)\n",
    "print(df4_vsort)"
   ],
   "id": "effc752208ae187",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          3         1         3         0         4\n",
      "1  0.381645  0.677117 -0.177761  0.951410 -0.039082\n",
      "1 -0.414413 -0.515480  0.147597 -1.559525 -0.217399\n",
      "0  0.270778 -0.521531 -0.924679 -1.102402  0.232356\n"
     ]
    }
   ],
   "execution_count": 25
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "4、练习处理缺失数据，统计与计算",
   "id": "ffe04e32322a777d"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:48:02.667709Z",
     "start_time": "2025-01-07T11:48:02.658007Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#处理缺失数据\n",
    "df_data = pd.DataFrame([np.random.randn(3), [1., 2., np.nan],[np.nan, 4., np.nan], [1., 2., 3.]])\n",
    "print(df_data.head())"
   ],
   "id": "3d699fb592c3e933",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          0         1         2\n",
      "0 -0.372971  1.907949 -1.814044\n",
      "1  1.000000  2.000000       NaN\n",
      "2       NaN  4.000000       NaN\n",
      "3  1.000000  2.000000  3.000000\n"
     ]
    }
   ],
   "execution_count": 26
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:48:21.852175Z",
     "start_time": "2025-01-07T11:48:21.832875Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 判断是否存在缺失值：isnull\n",
    "print(df_data.isnull())\n",
    "# 丢弃缺失数据： dropna\n",
    "print(df_data.dropna())\n",
    "print(df_data.dropna(axis=1))"
   ],
   "id": "69b1242fb54acaf4",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "       0      1      2\n",
      "0  False  False  False\n",
      "1  False  False   True\n",
      "2   True  False   True\n",
      "3  False  False  False\n",
      "          0         1         2\n",
      "0 -0.372971  1.907949 -1.814044\n",
      "3  1.000000  2.000000  3.000000\n",
      "          1\n",
      "0  1.907949\n",
      "1  2.000000\n",
      "2  4.000000\n",
      "3  2.000000\n"
     ]
    }
   ],
   "execution_count": 27
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:48:30.342509Z",
     "start_time": "2025-01-07T11:48:30.336737Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 填充缺失数据： fillna\n",
    "print(df_data.fillna(-100.))"
   ],
   "id": "4cbb71803d054814",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "            0         1           2\n",
      "0   -0.372971  1.907949   -1.814044\n",
      "1    1.000000  2.000000 -100.000000\n",
      "2 -100.000000  4.000000 -100.000000\n",
      "3    1.000000  2.000000    3.000000\n"
     ]
    }
   ],
   "execution_count": 28
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:49:16.820046Z",
     "start_time": "2025-01-07T11:49:16.812478Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#统计与计算\n",
    "df_obj = pd.DataFrame(np.random.randn(5,4), columns = ['a', 'b', 'c', 'd'])\n",
    "print(df_obj)"
   ],
   "id": "12ade588dae66787",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          a         b         c         d\n",
      "0  0.414445 -0.310092 -0.425776 -1.178321\n",
      "1  0.772273  0.183923  0.787458 -0.086623\n",
      "2 -0.069777 -0.778253  1.039920  1.033957\n",
      "3 -1.165960 -0.431948  0.586108 -1.109832\n",
      "4 -0.033518  0.118289 -0.743047 -1.720559\n"
     ]
    }
   ],
   "execution_count": 29
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:49:28.656263Z",
     "start_time": "2025-01-07T11:49:28.648272Z"
    }
   },
   "cell_type": "code",
   "source": "df_obj.sum()",
   "id": "eb71448d82877b17",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a   -0.082537\n",
       "b   -1.218079\n",
       "c    1.244663\n",
       "d   -3.061378\n",
       "dtype: float64"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 30
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:49:35.468901Z",
     "start_time": "2025-01-07T11:49:35.456321Z"
    }
   },
   "cell_type": "code",
   "source": "df_obj.max()",
   "id": "9faae69396d4f722",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    0.772273\n",
       "b    0.183923\n",
       "c    1.039920\n",
       "d    1.033957\n",
       "dtype: float64"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 31
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-01-07T11:49:42.253059Z",
     "start_time": "2025-01-07T11:49:42.237978Z"
    }
   },
   "cell_type": "code",
   "source": "df_obj.min(axis=1, skipna=False)",
   "id": "492f01f52418d4c6",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0   -1.178321\n",
       "1   -0.086623\n",
       "2   -0.778253\n",
       "3   -1.165960\n",
       "4   -1.720559\n",
       "dtype: float64"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 32
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
